/**
 * 
 * @author vivo
 * 
 */
public class test3 {
	/**
	 * 
	 * @param a
	 */
	public static void main(String[] a) {
		int count = 1000;
		while (count-- > 0) {

			String contents = "aaaaaaaaaaaaa a aaaaaaa aaaaaaaa aaaaaaaaaaaa aaa. a    ddddd ddddd dd d d . sssss s s s.";
			char[] stops = new char[] { '.', '?', '!'};
			int i = 0;
			int max = 200 > contents.length() ? contents.length() : 200;
			boolean stop = false;
			char c;
			int firstStopPos = 0;
			StringBuilder resultsentence = new StringBuilder();
			while (i < max && !stop) {
				c = contents.charAt(i);
				resultsentence.append(c);
				for (char s : stops) {
					if (c == s) {
						firstStopPos = i;
						stop = true;
					}
				}
				i++;
			}
			System.out.println(resultsentence.toString());
		}
	}
}
